The context of the invention is therefore compression, in particular video compression, based on blockwise coding schemes, of MPEG-2, MPEG-4, part 2 or 10 type. These compression schemes operate on base entities called macroblocks. In what follows, the term block may denote groups of any size of smaller blocks and hence in particular may denote macroblocks. These schemes implement a coding decision method the aim of which is to choose for each macroblock the coding mode which appears best suited. This choice may be made a posteriori, that is to say by evaluating all the possible modes, in particular by calculating cost of coding and distortion. The mode of coding exhibiting the best bit rate-distortion compromise is then chosen. The known coding decision methods operate in a causal manner: once a decision has been taken in respect of a macroblock, we go to the next macroblock. This is done in the order of scanning of the image.
The known methods thus take no account of the impact of the decisions on the future macroblocks. This has negative consequences on the map of the modes chosen over the whole of an image which may exhibit a degree of inhomogeneity. The block effects are then visible. This also leads to negative consequences on the cost of coding since the cost of coding of a macroblock is generally very dependent on the choice of the modes of coding of the neighbouring macroblocks, in particular situated above and to the left in the case of a left to right and top to bottom scan. The decision taken regarding a macroblock may be the best for this macroblock, but since it affects the following macroblocks, its consequence may be the choosing of a nonoptimal decision for later macroblocks. Approaches with several iterations making it possible to reconsider the decisions taken previously may be used. The amount of calculation is then high. Moreover, these approaches make it possible to avoid a nonoptimal decision for the later macroblocks only by adopting a so-called stochastic relaxation strategy which involves an amount of calculation that is incompatible with, in particular, video coding.
Other approaches based on the calculation of a collection of modes of coding over a set of macroblocks presupposes the consideration of all the possible combinations of modes of coding, this obviously being extremely expensive in terms of calculation time.